import { formatTime } from '@/utils'
import i18n from '@/locales/index' 
const { t } = i18n.global
export const listInnerColumns =  [
  {
    title: t('common.sequenceNo'), dataIndex: 'index', key: 'index', align: 'center', width: 80,
    customRender: ({ index }) => {
      return index + 1
    }
  },
  { title: t('basicData.processVer'), dataIndex: 'processName', key: 'processName', align: 'center', width: 180 },
  { title: t('hangManage.roadVer'), dataIndex: 'roadmapName', key: 'roadmapName', align: 'center', width: 130
  // ,customRender: ({ record }) => {
  //   return record.standardTotalMinute && formatSeconds(record.standardTotalMinute)
  // }
},
  { title: t('other.processLine'), dataIndex: 'lineId', key: 'lineId', align: 'center', width: 130},
  { title: '生产人数', dataIndex: 'staffNum', key: 'staffNum', align: 'center', width: 180 },
  { title: t('hangManage.startProcess'), dataIndex: 'firstProcess', key: 'firstProcess', align: 'center', width: 180 },
  { title: t('hangManage.endProcess'), dataIndex: 'lastProcess', key: 'lastProcess', align: 'center', width: 180 },
  { title: '申请时间', dataIndex: 'applyTime', key: 'applyTime', align: 'center', width: 180,
    customRender: ({ text }) => {
      return formatTime(text, 'YYYY-MM-DD HH:mm:ss')
    } 
  },
  {
    title: t('other.doneTime'), dataIndex: 'finishTime', key: 'finishTime', align: 'center', width: 180,
    customRender: ({ text }) => {
      return formatTime(text, 'YYYY-MM-DD HH:mm:ss')
    }
  },
  { title: t('common.state'), dataIndex: 'status', key: 'status', align: 'center', width: 100 ,fixed: 'right'},
  { title: t('common.operate'), dataIndex: 'operate', key: 'operate', align: 'center', width: 200, fixed: 'right' },
]

export const operateColumns =  [
  {
    title: t('hangManage.makeNo'), dataIndex: 'moNo', key: 'moNo', align: 'center', width: 80},
  { title: t('basicData.styleNo'), dataIndex: 'styleNo', key: 'styleNo', align: 'center', width: 180 },
  { title: t('basicData.productType'), dataIndex: 'productType', key: 'productType', align: 'center', width: 180 },
  { title: '总件数', dataIndex: 'quantity', key: 'quantity', align: 'center', width: 130 },
  { title: t('other.processLine'), dataIndex: 'lineId', key: 'lineId', align: 'center', width: 130 },
  { title: '选中人数', dataIndex: 'userNum', key: 'userNum', align: 'center', width: 180 },
  { title: t('common.createTime'), dataIndex: 'createTime', key: 'createTime', align: 'center', width: 130,
    /*customRender: ({ text }) => {
      return formatTime(text, 'YYYY-MM-DD HH:mm:ss')
    } */
  }
]
export const listHeaders =  [t('common.sequence'), t('basicData.section'), t('basicData.processNo'), t('basicData.processNames'), t('basicData.processCodes'), t('basicData.standardTimeSec'), t('basicData.priceYuan'), t('hangManage.artGuideIns'), t('hangManage.imgVideo'), t('basicData.workName'), t('basicData.skillLv')]